TeamA

id: task-230 title: Add --plain to task create/edit and print plain details after operation status: Done assignee:

  • '@codex' created_date: '2025-08-12 17:10' updated_date: '2025-08-12 19:13' labels:
  • cli
  • plain-output dependencies: [] priority: high

Description

Implement --plain flag for backlog task create and backlog task edit. When provided, after the operation completes successfully, print the task content in the same plain-text format as backlog task <task-id> --plain — including the leading File: line pointing to the task file and the structured sections (Status, Created, Description, Acceptance Criteria, etc.).

Context: We already support --plain for viewing tasks and drafts. Bringing this to create/edit improves shell scripting and AI agent integrations by returning the final task content immediately.

Acceptance Criteria

  • [x] #1 Running: backlog task create "Example" --desc "Hello" --plain prints plain-text details of the created task using the existing formatter
  • [x] #2 Output begins with 'File: ' and includes 'Task task- - ', Status, Created, Description, Acceptance Criteria sections</li> <li>[x] #3 Running: backlog task edit <id> -s "In Progress" --plain prints the updated task in plain-text format after saving</li> <li>[x] #4 Tests cover both create/edit flows with --plain and assert 'File:' line, key sections, and absence of TUI escape codes</li> <li>[x] #5 Successful runs exit with code 0; behavior works with --desc alias and other supported flags</li> </ul> <!-- AC:END --> <h2>Implementation Notes</h2> <p>Implemented --plain flag for task create/edit. When provided, prints plain formatted task details after operation (starts with File: line). Added tests for both flows asserting File: line, Status/Created/Description/AC sections, and absence of TUI codes. Verified --desc alias works. All tests passing.</p> <!-- BODY END --> </article> </div> <div class="right-sidebar"> <header>On this page</header> <p> <!-- OUTLINE START --> <div class="outline"><ol class="outline-level-1"><ol class="outline-level-2"><li class="outline-item-level-2"><a href="#Description">Description</a></li><li class="outline-item-level-2"><a href="#AcceptanceCriteria">Acceptance Criteria</a></li><li class="outline-item-level-2"><a href="#ImplementationNotes">Implementation Notes</a></li></ol></li></ol></div> <!-- OUTLINE END --> </p> </div> <div id="popup-overlay" class="popup-overlay hidden"></div> </div> <div class="bottombar"> <span>Brodocs MVP</span> </div> <div id="popup-modal" class="popup-modal"> <div class="popup-header"> <span id="popup-title" class="popup-title">Example Popup Title</span> <button class="popup-close" id="popup-close-btn">×</button> </div> <hr class="popup-separator"/> <div id="popup-content" class="popup-content"> <p>This is some example popup content text.</p> </div> <button class="popup-confirm" id="popup-confirm-btn">Close</button> </div> </body> </html>